package com.handong.handdemo.activity;

import android.os.Bundle;

import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.google.android.material.snackbar.Snackbar;

import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import androidx.fragment.app.FragmentController;
import androidx.fragment.app.FragmentManager;

import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import com.handong.handdemo.R;
import com.handong.handdemo.ui.view.LoginBottomDialog;

public class GetMesActivity extends AppCompatActivity {

    private Button connect;
    private TextView textView;
    private LoginBottomDialog mLoginBottomDialog;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_get_mes);
        Toolbar toolbar = findViewById(R.id.toolbar);
        setSupportActionBar(toolbar);
        initUI();
        initData();
        FloatingActionButton fab = findViewById(R.id.fab);
        fab.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
                        .setAction("Action", null).show();
            }
        });
    }
    private void initUI() {
        connect=findViewById(R.id.getMes);
        textView=findViewById(R.id.connectMes);
        mLoginBottomDialog=LoginBottomDialog.create(this.getSupportFragmentManager());
    }

    private void initData() {
        connect.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                mLoginBottomDialog.show();
            }
        });

    }


}